﻿<UserControl x:Class="SuperSocket.Management.AgentClient.MainPanel"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="600">
    <UserControl.Resources>
        <ResourceDictionary Source="NodeTemplates.xaml"></ResourceDictionary>
    </UserControl.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid Grid.Row="0" Background="{StaticResource TopGradient}" HorizontalAlignment="Stretch">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
                <ColumnDefinition Width="*"></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition></RowDefinition>
                <RowDefinition Height="Auto"></RowDefinition>
            </Grid.RowDefinitions>
            <TextBlock Grid.Column="0" Grid.Row="0"
                   Style="{StaticResource MainTitle}"
                   Text="SuperSocket Server Manager"></TextBlock>
            <Button Content="Configure" Grid.Column="2"
                    Margin="5"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Center"
                    Click="Configure_Click"
                    Width="100"></Button>
            <Rectangle Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3"
                       Fill="#FFDACEEC" Height="5" VerticalAlignment="Bottom"></Rectangle>
        </Grid>
        <ItemsControl Grid.Row="1"
                      ItemsSource="{Binding Nodes}"
                      ItemTemplate="{StaticResource NodeContainerTemplate}">
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <StackPanel Orientation="Vertical">
                    </StackPanel>
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
        </ItemsControl>
    </Grid>
</UserControl>
